<?php

header("Content-type:text/html;charset=utf-8");

$id=$_POST["id"];

$conn = mysql_connect("localhost","root","root");
	
mysql_select_db("zrt");

$result = mysql_query("select * from car where use_id = '$id'",$conn);
	
	if(mysql_num_rows($result) >0){
		while($rows=mysql_fetch_assoc($result)){
			
			echo array_reduce($rows,"fun");
		}
		//在ajax中,php是通过echo语句返回responseText
		
	}else{
		echo 0;
	}
	function fun($v1,$v2){
		return $v1.",".$v2;
	}
	mysql_close($conn);
	
?>